﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace MvcFinalTest.Validation
{
    public class ZipCodeValidator : ValidationAttribute
    {
        public override bool IsValid(object value)
        {
            if (value.ToString().Length == 5)
            {
                return true;
            }
           
            return false;
        }
    }
}